import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SharedModule } from 'src/app/shared/shared.module';
// 导入 ngx-echarts
import { NgxEchartsModule } from 'ngx-echarts';
import { BaselineComponent } from './baseline.component';
import { BaselineListComponent } from './baseline-list/baseline-list.component';
import { BaselineDetailComponent } from './baseline-detail/baseline-detail.component';


// 路由配置
const routes: Routes = [
  {
    // 一级路由
    path: '', component: BaselineComponent,
    // 二级路由
    children: [
      {
        path: '', component: BaselineListComponent,
        data: { breadcrumb: '基线列表' }
      },
      {
        path: 'baseline-list', component: BaselineListComponent,
        data: { breadcrumb: '基线列表' }
      },
      {
        path: 'baseline-detail', component: BaselineDetailComponent,
        data: { breadcrumb: '基线详情' }
      },
    ]
  },
];

@NgModule({
  imports: [
    RouterModule.forChild(routes),
    SharedModule,
    NgxEchartsModule
  ],
  declarations: [BaselineDetailComponent, BaselineComponent, BaselineListComponent]
})
export class BaselineModule { }
